<script setup lang="ts">
import { onMounted, ref } from 'vue';

const h1Ref = ref<HTMLHeadingElement | null>(null)
console.log('setup',h1Ref.value);

onMounted(() => {
  const h1DOM = document.querySelector('h1')
  console.log(h1DOM);
  
  console.log('onMpunted',h1Ref.value);

  h1Ref.value?.append('!!!')
  
})
</script>


<template>
  <h1 ref="h1Ref">我是h1</h1>
</template>
